# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Allan McRae <mcrae_allan@hotmail.com>
# Contributor: lp76 <l.peduto@gmail.com>

pkgname=gtk-vnc
pkgver=0.7.1
pkgrel=1
pkgdesc="A VNC viewer widget for GTK+"
url="https://wiki.gnome.org/Projects/gtk-vnc"
arch=(i686 x86_64)
license=(LGPL)
depends=(libgcrypt gtk3 gnutls libpulse)
makedepends=(intltool vala gobject-introspection gnome-common git perl-text-csv)
_commit=f8c89fc418faa21d6b5a2ad8fb9a41ffb9a9142b  # tags/v0.7.1^0
source=("git+https://git.gnome.org/browse/gtk-vnc#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^v//;s/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --with-examples --disable-static \
    --disable-werror
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
